package com.iot.system.config;


import com.iot.system.core.CoreLineHourEnergyInfoService;
import com.iot.system.core.CoreSystemHomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

@Component("energyTask")
public class EnergyTask {

    @Autowired
    private CoreLineHourEnergyInfoService coreLineHourEnergyInfoService;
    @Autowired
    private CoreSystemHomeService coreSystemHomeService;

    public void ryNoParams()
    {
        coreLineHourEnergyInfoService.dealWithLineEnergy(1L, null);
        System.err.println("EnergyTask_ryNoParams_处理产线能耗:" + LocalDateTime.now());
    }

    public void countTheDailyDataVolume()
    {
        coreSystemHomeService.countTheDailyDataVolume(null);
        System.err.println("EnergyTask_ryNoParams_统计每天: " + LocalDateTime.now() );
    }

    public void countLineHourYieldsInfo()
    {
        coreLineHourEnergyInfoService.countLineHourYieldsInfo(1L,null);
        System.err.println("EnergyTask_countLineHourYieldsInfo_统计每小时产线产能: " + LocalDateTime.now() );
    }

}
